package com.xiaotao.mapper;

import com.xiaotao.entity.PaymentLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * PaymentLogMapper继承基类
 */
@Mapper
@Repository
public interface PaymentLogMapper extends MyBatisBaseDao<PaymentLog, Integer> {
    // 根据订单ID查询支付日志
    List<PaymentLog> selectPaymentLogsByOrderId(@Param("orderId") String orderId);

    // 根据支付流水号查询支付日志
    PaymentLog selectPaymentLogByPayNo(@Param("payNo") String payNo);

    // 更新支付状态
    int updatePaymentStatus(@Param("id") Integer id, @Param("payStatus") byte payStatus);
}